<?php

namespace App\Providers;

use App\Http\Controllers\Resources\AdminController;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        //
    }

    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //文章管理

        $this->app
            ->when(AdminController::class)
            ->needs('$_resource')
            ->give('admin');
    }
}
